﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AddSpeedPanel : MonoBehaviour
{
    public float m_SpeedScale = 2;
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void OnTriggerEnter2D(Collider2D collision)
    {
        var ship = UtilsGame.FindShip(collision.gameObject);

        if(ship)
        {
            ship.AddForce(ship.transform.up, ship.m_ShipStruct.VelocityMax * m_SpeedScale);
        }
        
    }
}
